
export function objectEq(obj1: any[], obj2: any[]): boolean {
 const obj1Type = typeof obj1;
 const obj2Type = typeof obj2;
 
 if (obj1Type !== obj2Type) {
   return false;
 }
  if(obj1Type !== 'object'){
    return obj1 === obj2;
  }
  if(obj1Type === 'object' && Array.isArray(obj1) && Array.isArray(obj2)){
    if(obj1.length !== obj2.length){
      return false;
    }
    for(let i = 0; i < obj1.length; i++){
      const item1 = obj1[i];
      const item2 = obj2[i];
      if(!objectEq(item1, item2)){
        return false;
      }
    }
    return true;
  }else if(obj1Type === 'object'){
    const keys1 = Object.keys(obj1);
    const keys2 = Object.keys(obj2);
    if (keys1.length !== keys2.length) {
      return false;
    }
    for (const key of keys1) {
      if (!objectEq(obj1[key], obj2[key])) {
        return false;
      }
    }
    return true;
  }
  return false;
}